Skip to content

chore: update main branch#191

Merged
demolaf merged 68 commits intomainfrom
next
Mar 18, 2026
Merged

chore: update main branch#191
demolaf merged 68 commits intomainfrom
next

Conversation

@demolaf
Copy link
Copy Markdown
Member

@demolaf demolaf commented Mar 18, 2026

Breaking Changes

  • initializeApp() now accepts AppOptions instead of positional projectId and credential arguments. Project ID is auto-discovered from credentials, environment variables, or the GCE metadata server if not provided.
  • Firebase service constructors (Auth(app), Firestore(app), etc.) have been removed. Use the instance methods on FirebaseApp instead: app.auth(), app.firestore(), app.messaging(), etc. Service instances are now cached — calling app.auth() multiple times returns the same instance.
  • ActionCodeSettings.dynamicLinkDomain has been removed. Use linkDomain instead.
  • Credential is now a sealed class with ServiceAccountCredential and ApplicationDefaultCredential subtypes.

New Features

App

  • Added multi-app support: initializeApp(options, name: 'secondary') and FirebaseApp.getApp('name')
  • Added app.serviceAccountEmail() and app.sign() extension methods on FirebaseApp
  • All outgoing SDK requests now include an X-Firebase-Client: fire-admin-dart/<version> usage tracking header

Auth

  • Added tenant support: app.auth().tenantManager() returns a TenantManager; use tenantManager.authForTenant(tenantId) for tenant-scoped auth operations
  • Added ProjectConfigManager for managing project-level auth configuration (email privacy, SMS regions, password policies, MFA, reCAPTCHA, mobile links) via app.auth().projectConfigManager()
  • Added TOTP multi-factor authentication support
  • Added SessionCookieOptions type for createSessionCookie
  • Added linkDomain to ActionCodeSettings
  • Added Credential.getAccessToken() to retrieve an OAuth2 access token
  • Added reCAPTCHA managed rules, key types, and toll fraud protection configuration in tenant settings

Firestore

  • Added multi-database support: app.firestore(databaseId: 'analytics-db')
  • Added Transaction.getQuery() to execute queries within a transaction
  • Added Transaction.getAggregateQuery() to execute aggregation queries within a transaction
  • Added BulkWriter for high-throughput writes with automatic batching (20 ops/batch) and rate limiting using the 500/50/5 rule
  • Added SetOptions for merge operations, available on WriteBatch, Transaction, BulkWriter, and DocumentReference
  • Added Vector Search support: FieldValue.vector(), VectorValue, query.findNearest(), VectorQuery, VectorQuerySnapshot
  • Added Query Explain API: query.explain() and vectorQuery.explain()
  • Added query partitioning: CollectionGroup.getPartitions(desiredPartitionCount) returns a list of QueryPartition objects; call partition.toQuery() to execute each chunk in parallel
  • Added Firestore.recursiveDelete(ref, bulkWriter) for bulk deletion of documents and collections
  • withConverter() now accepts null to reset a typed reference back to DocumentData

Storage (new service)

  • Added app.storage() with full FirebaseApp lifecycle integration
  • Added emulator support via FIREBASE_STORAGE_EMULATOR_HOST
  • Added file.getSignedUrl() for V2/V4 signed URL generation
  • Added file.getDownloadURL() for retrieving a permanent download URL

Messaging

  • Added messaging.subscribeToTopic(tokens, topic) and messaging.unsubscribeFromTopic(tokens, topic)

Functions (new service)

  • Added app.functions() for Cloud Functions admin operations
  • Added Task Queue API: functions.taskQueue(functionName) with enqueue() and delete(), supporting scheduling, deadlines, custom headers, and custom task IDs
  • Added Cloud Tasks emulator support via CLOUD_TASKS_EMULATOR_HOST

Bug Fixes

  • Fixed exceptions being silently swallowed instead of rethrown across all services
  • Fixed Messaging.sendEach() incorrectly returning internalError for invalid registration tokens; now correctly returns invalidArgument
  • Fixed JWT decode exceptions and integer division issues in verifySessionCookie
  • Fixed missing INVALID_ARGUMENT error code mapping in SecurityRules
  • Fixed ExponentialBackoff in Firestore not correctly tracking backoff completion state
  • Fixed Auth using invalidProviderUid instead of invalidUid in getAccountInfoByFederatedUid

demolaf and others added 30 commits November 24, 2025 13:50
…, service caching, and auto project ID discovery (#106)

* wip refactor FirebaseApp initialization logic

* fix: incorrect metadata url

* feat: add getOrInitService to each service for caching and cleanup

* fix: doc comments

* fix: tests errors

* fix: tests errors, skip flaky tests

* fix: lint errors

* fix: ensure emulator is running for e2e tests

* add run scripts to example

* fix: lint errors

* fix: lint errors

* chore: cleanup main.dart, add comments to script on how to test example

* chore: better test description

* fix: services with emulator capabilities should use unauthenticated client

* refactor: All services now use FirebaseServiceType for registration, replacing magic strings.

* feat: added convenience instance methods for each service

* fix: lint errors

* refactor: separate HTTP clients and request handlers

- Splits API handling into HttpClient (low-level HTTP, emulator config, googleapis) and RequestHandler (business logic, transformations, validation).

- Improves separation of concerns across App Check, Auth, Firestore, Messaging, and Security Rules.

* test: add firebase_app tests
…ent (#107)

* refactor: use AuthClient instead of http.Client

* refactor: replace ProjectIdProvider with googleapis_auth_utils

This commit replaces the internal `ProjectIdProvider` with a new, reusable package `googleapis_auth_utils`. This new package introduces an extension on `AuthClient` to handle project ID discovery and caching.

Key changes:
- A new local package `googleapis_auth_utils` is created.
- An extension `AuthClientX` provides `getProjectId()` for project ID discovery.
- The now-redundant `ProjectIdProvider` class in `dart_firebase_admin` has been removed.
- All services (Auth, Firestore, AppCheck, etc.) now use `(await app.client).getProjectId()` to discover the project ID.
- The project ID discovery logic is now more robust, checking environment variables, credential files, gcloud config, and the metadata service.
- The `getProjectId()` and `getServiceAccountEmail()` methods on `ApplicationDefaultCredential` have been removed in favor of the new extension methods.

* fix: lint errors

* fix: cache project ID in http client

* fix CI

* fix CI

* fix CI

* fix CI

* refactor: implement singleton pattern for AppRegistry and update internal visibility

* feat: enhance Google Cloud project ID discovery and caching mechanism
* feat(auth): add support for tenants

* add e2e tests

* more

* more

* fixes

* fix conflicts

* refactor: update terminology from 'whitelisted' to 'allowed' for consistency

---------

Co-authored-by: Ademola Fadumo <demolafadumo@gmail.com>
* refactor(dart): apply DRY pattern to HTTP clients for consistent client/projectId handling

Add `_run` helper method to MessagingHttpClient, SecurityRulesHttpClient, and AppCheckHttpClient that accepts both client and projectId as callback parameters. This eliminates redundant `await app.client` calls and centralizes client/projectId retrieval logic.

* refactor: update exception constructors to use FirebaseServiceType for consistency

* test: add AppRegistry tests for singleton behavior and environment options

* refactor: update pubspec.yaml for workspace resolution and dependency management
* refactor(dart): apply DRY pattern to HTTP clients for consistent client/projectId handling

Add `_run` helper method to MessagingHttpClient, SecurityRulesHttpClient, and AppCheckHttpClient that accepts both client and projectId as callback parameters. This eliminates redundant `await app.client` calls and centralizes client/projectId retrieval logic.

* refactor: update exception constructors to use FirebaseServiceType for consistency

* test: add AppRegistry tests for singleton behavior and environment options

* feat: implement sign() extension on AuthClient with IAM Credentials API, local RSA signing, and service account impersonation

* refactor: delegate credential implementation to googleapis_auth_utils

* refactor: use GoogleCredential to parse service account files

* refactor(auth): use Expando to associate credentials with AuthClient

* feat(auth): add getAccessToken() method to GoogleCredential for OAuth2 token retrieval

* chore: update googleapis dependency to version 15.0.0 and add coverage.lcov to .gitignore

* refactor: sign method to use CryptoSigner with custom endpoint.

* feat: add universeDomain support for GoogleCredential and improve IAM endpoint handling
…#110)

* feat(exception): enhance FirebaseAppException with JSON serialization and update error codes

* refactor(app-check): improve testability and add more tests
…error codes for Auth exceptions and tests (#111)

* feat: add missing error codes for invalid hosting link domain and service account

* feat: handle empty server error messages and add tests for FirebaseAuthAdminException

* feat: update JSON serialization methods to public and improve consistency

* feat: add ProjectConfigManager and related methods for project configuration management

* test: includes comprehensive unit and integration tests for project config features

- Adds detailed examples for project configuration and tenant management to the example application.

- Renames the service account key file in examples to `service-account-key.json` for consistency.

* refactor: remove unused UserMetadata.toJson export for testing

* test: add comprehensive tests for UserMetadata and UserInfo response handling

* feat: deprecate dynamicLinkDomain in ActionCodeSettings and introduce linkDomain

* test: add tests for email action links for password reset, email verification, sign-in, and change email functions

* refactor: remove deprecated dynamicLinkDomain in ActionCodeSettings

* fix: update Java setup in build configuration to use version 21

* fix ci
* refactor(auth_config): toGoogleCloudIdentitytoolkitV1MfaFactor methods for better readability

* refactor: update createSessionCookie method to use SessionCookieOptions

* feat(auth): add TOTP multi-factor authentication support with configuration and serialization

* fix(auth): handle JWT decode exceptions in verifySessionCookie

* fix: use AuthProviderConfig sealed classes to fix casting errors

* fix: session cookie JWT exceptions and integer division

* test: add unit tests for auth methods

* test: add emulator safety to prevent production writes

* test: add production-safe helpers and integration tests for tenant and project configurations

* fix failing tests

* test: add more auth tests

* feat(auth): add support for reCAPTCHA managed rules, key types, and toll fraud protection in tenant config

- Introduce RecaptchaAction, RecaptchaKeyClientType enums, RecaptchaManagedRule, RecaptchaTollFraudManagedRule, and RecaptchaKey classes
- Extend RecaptchaConfig to support managedRules, recaptchaKeys, useSmsBotScore, useSmsTollFraudProtection, and smsTollFraudManagedRules
- Update serialization, deserialization, and validation logic for new fields
- Enhance tests to cover new reCAPTCHA config features
- Update request handler to map new reCAPTCHA config fields

* test: improve TenantAwareAuth tests and add internal constructors for testing

* test: add comprehensive TenantManager unit tests

* test: add Tenant.toJson tests

* docs: clarify parameter type in TenantManager.internal constructor
* refactor(messaging): rename _toProto methods to _toRequest for message serialization

* feat(messaging): add topic subscription and unsubscription APIs with validation and tests

* wip: add Cloud Run example server with messaging and token verification APIs

* feat(messaging): complete implementation with tests and bug fixes

* chore: lint errors

* chore: fix lint errors
)

* refactor(messaging): rename _toProto methods to _toRequest for message serialization

* feat(messaging): add topic subscription and unsubscription APIs with validation and tests

* wip: add Cloud Run example server with messaging and token verification APIs

* feat(messaging): complete implementation with tests and bug fixes

* chore: lint errors

* chore: fix lint errors

* feat(functions): add Cloud Functions Task Queue admin API with validation and error handling

* refactor: rename client param to api x_http_client.dart

* wip: add Cloud Tasks emulator support with URL rewriting and env detection

* test: add integration and unit tests for Task Queue, enqueue, delete

* test: add comprehensive unit tests for Functions TaskQueue, validation, and error handling

* fix: use existing test service account credentials

- add functions ts example project for functionsExample method in example/main.dart

* chore: add package-lock.json to .gitignore

* refactor: update taskQueue to use named extensionId parameter and update tests

* chore: add doc/api to .gitignore
…ent (#117)

* refactor(messaging): rename _toProto methods to _toRequest for message serialization

* feat(messaging): add topic subscription and unsubscription APIs with validation and tests

* wip: add Cloud Run example server with messaging and token verification APIs

* feat(messaging): complete implementation with tests and bug fixes

* chore: lint errors

* chore: fix lint errors

* feat(functions): add Cloud Functions Task Queue admin API with validation and error handling

* refactor: rename client param to api x_http_client.dart

* wip: add Cloud Tasks emulator support with URL rewriting and env detection

* test: add integration and unit tests for Task Queue, enqueue, delete

* test: add comprehensive unit tests for Functions TaskQueue, validation, and error handling

* fix: use existing test service account credentials

- add functions ts example project for functionsExample method in example/main.dart

* chore: add package-lock.json to .gitignore

* refactor: update taskQueue to use named extensionId parameter and update tests

* chore: add documentation generation and deployment workflow

- Add docs.yml GitHub Actions workflow for building and deploying documentation to GitHub Pages
- Add generate-docs.sh script for generating package documentation
- Update .gitignore to exclude generated docs
- Add index.html landing page for documentation
- Update melos scripts in pubspec.yaml to support docs generation

* Update docs workflow to allow manual deployment

* fix: update to latest GitHub Pages actions

* fix: update flutter-action to latest v2 to resolve set-output deprecation warnings

* temp: allow deployment on PRs for testing

* temp: remove environment protection for testing

* chore: restore production docs deployment configuration
…ions and tests (#119)

* refactor(messaging): rename _toProto methods to _toRequest for message serialization

* feat(messaging): add topic subscription and unsubscription APIs with validation and tests

* wip: add Cloud Run example server with messaging and token verification APIs

* feat(messaging): complete implementation with tests and bug fixes

* chore: lint errors

* chore: fix lint errors

* feat(functions): add Cloud Functions Task Queue admin API with validation and error handling

* refactor: rename client param to api x_http_client.dart

* wip: add Cloud Tasks emulator support with URL rewriting and env detection

* test: add integration and unit tests for Task Queue, enqueue, delete

* test: add comprehensive unit tests for Functions TaskQueue, validation, and error handling

* fix: use existing test service account credentials

- add functions ts example project for functionsExample method in example/main.dart

* chore: add package-lock.json to .gitignore

* refactor: update taskQueue to use named extensionId parameter and update tests

* chore: add documentation generation and deployment workflow

- Add docs.yml GitHub Actions workflow for building and deploying documentation to GitHub Pages
- Add generate-docs.sh script for generating package documentation
- Update .gitignore to exclude generated docs
- Add index.html landing page for documentation
- Update melos scripts in pubspec.yaml to support docs generation

* Update docs workflow to allow manual deployment

* fix: update to latest GitHub Pages actions

* fix: update flutter-action to latest v2 to resolve set-output deprecation warnings

* temp: allow deployment on PRs for testing

* temp: remove environment protection for testing

* chore: restore production docs deployment configuration

* refactor: use the default storage bucket from `AppOptions` if no bucket name is provided.

* fix: add mapping for 'INVALID_ARGUMENT' to FirebaseSecurityRulesErrorCode

* test: add tests for SecurityRules functionality

* test: enhance SecurityRules tests with cleanup and ruleset tracking

* fix: lint errors
* docs: update documentation link for sending messages to topic conditions

* refactor: update constructors to use internal factory methods for AppCheck, Auth, Firestore, Messaging, and SecurityRules

* update README
…i-db support for firestore (#121)

* docs: update documentation link for sending messages to topic conditions

* refactor: update constructors to use internal factory methods for AppCheck, Auth, Firestore, Messaging, and SecurityRules

* update README

* wip refactor google_cloud_firestore into its own package

* wip refactor google_cloud_firestore files to streamline package structure

* refactor: rename files and update imports for googleapis_firestore package

* docs: add googleapis_firestore package documentation section to index.html

* feat: add multi-database support to Firestore

This change refactors the Firestore integration to support multiple databases within a single `FirebaseApp`, similar to the Node.js Admin SDK.

Key changes:
- `app.firestore()` now accepts an optional `databaseId` to get or create a named database instance.
- Database instances are cached per `databaseId` to ensure the same instance is returned on subsequent calls.
- The `Firestore` service wrapper now manages multiple `googleapis_firestore.Firestore` delegates, one for each database ID.
- Settings are now passed during initialization via `app.firestore(settings: ...)`, and re-initialization with different settings is prevented.
- Added comprehensive unit and integration tests for multi-database functionality, CRUD operations, and emulator support.
- Refactored `EmulatorClient` into the `googleapis_firestore` package and removed redundant exception handling code.

* docs: update README.md with Firestore usage examples and corrections

* chore: fix lint errors

* feat: enhance Firestore example with multi-database support and usage scenarios

* feat: add googleapis_firestore dependency to pubspec.yaml

* feat: add failedPrecondition error code and update error messages in Firestore

* chore: comment out local Firestore emulator configuration in coverage script

* refactor(firestore): simplify and improve firestore tests
#113)

* feat: add `getQuery` method to Firestore transactions for transactional query execution.

* chore: revert version and changelog per reviewer feedback

* fix: use FirestoreException instead of generic Exception for read-after-write error
* feat: add BulkWriter for high-throughput writes

Adds a `BulkWriter` class to the Firestore client, enabling a large number of write operations to be performed in parallel.

Key features include:
- Automatic batching of writes (up to 20 operations per request).
- Built-in rate limiting (500 ops/sec, ramping up to 10,000 ops/sec) to avoid server hotspots, which can be configured or disabled.
- Automatic retry logic for transient server errors.
- Individual `Future` resolution for each write operation.
- `onWriteResult` and `onWriteError` callbacks for monitoring operation outcomes.
- `flush()` and `close()` methods for managing the write queue.

Additionally, this change introduces `SetOptions` to support merging data for `set()` operations across `DocumentReference`, `WriteBatch`, `Transaction`, and the new `BulkWriter`.

* feat: add support for Firestore data bundles (#124)

This commit introduces the `BundleBuilder` class, which allows for the creation of Firestore data bundles. Bundles can include document snapshots and named query snapshots.

The `BundleBuilder` serializes these elements into a length-prefixed JSON format that can be served to clients for pre-loading data, enabling faster initial load times and offline access.

The implementation includes:
- `BundleBuilder` to add documents and queries.
- `build()` method to generate the final `Uint8List` bundle.
- Internal models for bundle elements (`BundleMetadata`, `BundledDocumentMetadata`, `NamedQuery`, etc.).
- Helper methods for JSON serialization of Firestore types.
- New unit and integration tests for the bundling functionality.
This commit introduces two major features: Firestore Vector Search and Query Explain functionality.

**Vector Search:**
- Adds `FieldValue.vector()` to create `VectorValue` objects for storing vector embeddings in documents.
- Introduces `query.findNearest()` to perform vector similarity searches. This returns a `VectorQuery` which can be executed with `.get()`.
- Adds `VectorQuerySnapshot` to represent the results of a vector search.
- New types `VectorQueryOptions` and `DistanceMeasure` are added to configure vector queries.

**Query Explain:**
- Adds `query.explain(options)` and `vectorQuery.explain(options)` methods.
- These methods return an `ExplainResults` object containing `ExplainMetrics` with plan summaries and optional execution statistics.
- New types `ExplainOptions`, `ExplainResults`, `ExplainMetrics`, `PlanSummary`, and `ExecutionStats` are introduced.

**Other Changes:**
- Adds `size` and `empty` getters to `QuerySnapshot`.
- Extends the internal testing helper `firestore.snapshot_()` to support creating snapshots for missing documents.
…PI and tests

- Implement CollectionGroup.getPartitions() to partition queries for parallel execution
- Add QueryPartition class for partition cursors and toQuery() method
- Provide sorting and comparison utilities for partition cursors
- Add unit and production tests for query partitioning
…ponses and ensure partition sorting across pages

- Add and enhance unit and production tests for partition pagination and edge cases
This commit introduces two major features: Firestore Vector Search and Query Explain functionality.

**Vector Search:**
- Adds `FieldValue.vector()` to create `VectorValue` objects for storing vector embeddings in documents.
- Introduces `query.findNearest()` to perform vector similarity searches. This returns a `VectorQuery` which can be executed with `.get()`.
- Adds `VectorQuerySnapshot` to represent the results of a vector search.
- New types `VectorQueryOptions` and `DistanceMeasure` are added to configure vector queries.

**Query Explain:**
- Adds `query.explain(options)` and `vectorQuery.explain(options)` methods.
- These methods return an `ExplainResults` object containing `ExplainMetrics` with plan summaries and optional execution statistics.
- New types `ExplainOptions`, `ExplainResults`, `ExplainMetrics`, `PlanSummary`, and `ExecutionStats` are introduced.

**Other Changes:**
- Adds `size` and `empty` getters to `QuerySnapshot`.
- Extends the internal testing helper `firestore.snapshot_()` to support creating snapshots for missing documents.
…PI (#126)

* feat: add support for vector search and query explain

This commit introduces two major features: Firestore Vector Search and Query Explain functionality.

**Vector Search:**
- Adds `FieldValue.vector()` to create `VectorValue` objects for storing vector embeddings in documents.
- Introduces `query.findNearest()` to perform vector similarity searches. This returns a `VectorQuery` which can be executed with `.get()`.
- Adds `VectorQuerySnapshot` to represent the results of a vector search.
- New types `VectorQueryOptions` and `DistanceMeasure` are added to configure vector queries.

**Query Explain:**
- Adds `query.explain(options)` and `vectorQuery.explain(options)` methods.
- These methods return an `ExplainResults` object containing `ExplainMetrics` with plan summaries and optional execution statistics.
- New types `ExplainOptions`, `ExplainResults`, `ExplainMetrics`, `PlanSummary`, and `ExecutionStats` are introduced.

**Other Changes:**
- Adds `size` and `empty` getters to `QuerySnapshot`.
- Extends the internal testing helper `firestore.snapshot_()` to support creating snapshots for missing documents.

* feat(firestore): add query partitioning support with QueryPartition API and tests

- Implement CollectionGroup.getPartitions() to partition queries for parallel execution
- Add QueryPartition class for partition cursors and toQuery() method
- Provide sorting and comparison utilities for partition cursors
- Add unit and production tests for query partitioning

* refactor(firestore): update getPartitions to handle paginated API responses and ensure partition sorting across pages

- Add and enhance unit and production tests for partition pagination and edge cases

* fix: merge conflicts
kartikey321 and others added 26 commits February 9, 2026 12:53
* feat(firestore): add aggregation query support in transactions

- Add Transaction.getAggregation() method for executing count, sum, and average queries within transactions
- Create _AggregationReader class following same pattern as _QueryReader
- Add AggregateQuery._toProto() with transaction parameter support (transactionId, readTime, transactionOptions)
- Comprehensive test suite with 14 tests covering all scenarios
- All tests passing (14/14 new + 20/20 transaction + 59/59 aggregation = 93/93 total)
- No analyzer errors

Follows the same implementation pattern as query transactions for consistency.

* test(firestore): add comprehensive tests for Transaction.getQuery()

- Add 14 test cases covering all query scenarios in transactions
- Tests include: basic queries, orderBy, limit, offset, cursors
- Tests error handling: read-after-write prevention
- Tests combining get() and getQuery() in same transaction
- Tests read-only transactions, converters, conflict detection
- All tests pass with Firebase emulator
* refactor: remove googleapis_auth_utils deps

* fix ci

* refactor: add projectIdOverride to HMAC key operations

* chore: bump version to 1.0.0-beta.1

* chore: update changelog
* feat(firestore): allow resetting converters by passing null to `withConverter`

* feat(firestore): implement recursiveDelete method for bulk document deletion

* chore: fix lint errors

* chore: code cleanup

* feat(firestore): add JSON serialization and timestamp conversion methods

* test(firestore): add unit tests for Firestore.getAll() method

* test: unit test firestore apis

* test: unit test firestore apis

* test: add integration tests for Firestore.getAll()

* fix: wrap prod tests in runZoned
* chore: update README

* feat: add examples for App Check, Auth, Functions, Messaging, and Security Rules
* test: firebase app tests and fixes

* chore: code cleanup
* Update packages for googleapis_auth breaking changes

Accommodate breaking changes from googleapis_auth, specifically the removal of the
`serviceAccountCredentials` getter and the refactoring of cryptographic signing.
- Update `AuthClient.sign()` usages across dart_firebase_admin and googleapis_storage.
  The method now returns a `Future<String>` (base64-encoded signature) instead of
  an object with a `signedBlob` property.
- Explicitly pass `serviceAccountCredentials` into `sign()` invocations where available
  to maintain local RSA signing capabilities.
- Remove `serviceAccountCredentials` overrides from EmulatorClient implementations
  in dart_firebase_admin, googleapis_storage, and googleapis_firestore.
- Update Compute Engine environment detection in FunctionsRequestHandler to check
  internal credential options instead of the removed AuthClient.serviceAccountCredentials.
- Delete local AuthExtension helpers in dart_firebase_admin and googleapis_storage,
  migrating to the newly provided AuthClientSigningExtension methods.
- Update authClient.getServiceAccountEmail usages from a getter to a method invocation.

* OVERRIDES for in-flight PR

Will replace when google/googleapis.dart#717 lands

* test: fix functions test mock for metadata server email resolution

---------

Co-authored-by: Ademola Fadumo <48495111+demolaf@users.noreply.github.com>
…pis (#171)

* Update packages for googleapis_auth breaking changes

Accommodate breaking changes from googleapis_auth, specifically the removal of the
`serviceAccountCredentials` getter and the refactoring of cryptographic signing.
- Update `AuthClient.sign()` usages across dart_firebase_admin and googleapis_storage.
  The method now returns a `Future<String>` (base64-encoded signature) instead of
  an object with a `signedBlob` property.
- Explicitly pass `serviceAccountCredentials` into `sign()` invocations where available
  to maintain local RSA signing capabilities.
- Remove `serviceAccountCredentials` overrides from EmulatorClient implementations
  in dart_firebase_admin, googleapis_storage, and googleapis_firestore.
- Update Compute Engine environment detection in FunctionsRequestHandler to check
  internal credential options instead of the removed AuthClient.serviceAccountCredentials.
- Delete local AuthExtension helpers in dart_firebase_admin and googleapis_storage,
  migrating to the newly provided AuthClientSigningExtension methods.
- Update authClient.getServiceAccountEmail usages from a getter to a method invocation.

* OVERRIDES for in-flight PR

Will replace when google/googleapis.dart#717 lands

* test: fix functions test mock for metadata server email resolution

* feat: add extension methods for FirebaseApp to handle service account email and signing

* chore: bump dart_firebase_admin to 0.5.0 and googleapis_auth dependency to 2.1.0

* chore: update changelog

---------

Co-authored-by: Kevin Moore <kevmoo@google.com>
… requests (#169)

* test: firebase app tests and fixes

* chore: code cleanup

* feat: add FirebaseUserAgentClient to track SDK usage

* Update packages for googleapis_auth breaking changes

Accommodate breaking changes from googleapis_auth, specifically the removal of the
`serviceAccountCredentials` getter and the refactoring of cryptographic signing.
- Update `AuthClient.sign()` usages across dart_firebase_admin and googleapis_storage.
  The method now returns a `Future<String>` (base64-encoded signature) instead of
  an object with a `signedBlob` property.
- Explicitly pass `serviceAccountCredentials` into `sign()` invocations where available
  to maintain local RSA signing capabilities.
- Remove `serviceAccountCredentials` overrides from EmulatorClient implementations
  in dart_firebase_admin, googleapis_storage, and googleapis_firestore.
- Update Compute Engine environment detection in FunctionsRequestHandler to check
  internal credential options instead of the removed AuthClient.serviceAccountCredentials.
- Delete local AuthExtension helpers in dart_firebase_admin and googleapis_storage,
  migrating to the newly provided AuthClientSigningExtension methods.
- Update authClient.getServiceAccountEmail usages from a getter to a method invocation.

* OVERRIDES for in-flight PR

Will replace when google/googleapis.dart#717 lands

* test: fix functions test mock for metadata server email resolution

* feat: add extension methods for FirebaseApp to handle service account email and signing

* chore: bump dart_firebase_admin to 0.5.0 and googleapis_auth dependency to 2.1.0

* chore: update changelog

* chore: code cleanup

* fix ci

* feat: add X-Goog-Api-Client header

---------

Co-authored-by: Kevin Moore <kevmoo@google.com>
* fix: track backoff completion state in `ExponentialBackoff`

* test: add tests for ExponentialBackoff in google_cloud_firestore

* test: add unit tests for RateLimiter

* test: add unit tests for Firestore Transaction guards and retry logic

* test: add tests for empty batch commits, batch resets, and field path validation
* refactor: migrate from googleapis_storage to google_cloud_storage package

* feat: implement getDownloadURL method for retrieving signed download URLs

* chore: update README docs

* feat: add example for retrieving download URL from Firebase Storage

* chore: fix lint

* chore: code cleanup

* chore: update google_cloud_storage dependency to version 0.5.1

* chore: remove deps override
* wip changelog update

* chore: cleanup changelog
…ig (#186)

* Make server work with google_cloud_storage

* Use pub version

* Update storage.dart

* Env var

* Reverts

* Update storage.dart

* Update storage.dart

* Fix diff a bit

* Update pubspec.yaml

---------

Co-authored-by: Ademola Fadumo <48495111+demolaf@users.noreply.github.com>
* chore: add license headers

* chore: update google_cloud_storage dependency version

* chore: update license header management and add new templates

* chore: add scripts for license headers

* chore: update contributing guidelines and license year
@github-actions
Copy link
Copy Markdown

Coverage Report

✅ Coverage 73.79% meets 40% threshold

Total Coverage: 73.79%
Lines Covered: 4946/6703

Package Breakdown

Package Coverage
dart_firebase_admin 70.92%
google_cloud_firestore 77.01%

Minimum threshold: 40%

@demolaf demolaf merged commit 05189c6 into main Mar 18, 2026
13 checks passed
@demolaf demolaf deleted the next branch March 18, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants